package com.jiyun.fegin;

import com.github.pagehelper.PageInfo;
import com.jiyun.common.model.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @projectName: 2210A-project1
 * @package: com.jiyun.fegin
 * @className: TrainFegin
 * @author: 耿嘉军
 * @date: 2023/8/23 19:45
 * @version: 1.0
 */
@FeignClient(value = "day09train")
public interface TrainFegin {

    @RequestMapping("/train/trainPlayList")
    public List<TrainPlay> trainPlayList();

    @RequestMapping("/train/showCourseList")
    public List<Course> showCourseList();

    @RequestMapping("/train/showTrainCourse")
    public List<TrainCourse> showTrainCourse();

    @RequestMapping("/train/showTrainCountAll")
    public List<Train> showTrainCountAll();

    @RequestMapping("/train/showPaper")
    public List<Paper> showPaper();

    @RequestMapping("/train/findByTrainVO")
    public PageInfo<TrainVO> findByTrainVO(@RequestBody TrainDto dto);

    @RequestMapping("/train/findCourseBytrainId")
    public List<Course> findCourseBytrainId(@RequestParam("trainId") Integer trainId);

    @RequestMapping("/train/findPaperByTrainId")
    public List<Paper> findPaperByTrainId(@RequestParam("trainId") Integer trainId);

}
